// 结案审批 api
import request from '@/utils/request'

// 查询列表
export function caseclosureapprovalList(query) {
  return request({
    url: '/ruoyi-system/caseclosureapproval/list',
    method: 'get',
    params: query,
  })
}

// 查询审批详细
export function caseclosureapprovalDetail(id) {
  return request({
    url: '/ruoyi-system/caseclosureapproval/' + id,
    method: 'get',
  })
}

// 新增审批
export function addCaseclosureapproval(data) {
  return request({
    url: '/ruoyi-system/caseclosureapproval',
    method: 'post',
    data: data,
  })
}

// 修改
export function updateCaseclosureapproval(data) {
  return request({
    url: '/ruoyi-system/caseclosureapproval',
    method: 'put',
    data: data,
  })
}
// 提交审批
export function submitCaseclosureapproval(data) {
  return request({
    url: '/ruoyi-system/caseclosureapproval/submit',
    method: 'post',
    data: data,
  })
}

// 审核
export function reviewCaseclosureapproval(data) {
  return request({
    url: '/ruoyi-system/caseclosureapproval/review',
    method: 'post',
    data: data,
  })
}

// 删除审批
export function delCaseclosureapproval(id) {
  return request({
    url: '/ruoyi-system/caseclosureapproval/' + id,
    method: 'delete',
  })
}

// 预览

export function previewCaseclosureapproval(params) {
  return request({
    url: '/ruoyi-system/caseclosureapproval/preview',
    method: 'get',
    params,
  })
}

// 详情页预览
export function previewPdf(data) {
  return request({
    url: '/ruoyi-system/caseclosureapproval/pdfPreview',
    method: 'post',
    data,
  })
}

// 保存附件
export function addCaseclosureapprovalFiles(data) {
  return request({
    url: '/ruoyi-system/caseclosureapproval/addFiles',
    method: 'post',
    data,
  })
}

// 导出
export function exportCaseclosureapproval(data) {
  return request({
    url: '/ruoyi-system/caseclosureapproval/export',
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 立案号下拉
export function getCaseList() {
  return request({
    url: '/ruoyi-system/caseclosureapproval/caseList',
    method: 'get',
  })
}

// 获取处罚决定书填的内容呢
export function getContent(id) {
  return request({
    url: '/ruoyi-system/caseclosureapproval/getContent?caseId=' + id,
    method: 'get',
  })
}

// 转办接口
export function transferCaseclosureapproval(data) {
  return request({
    url: '/ruoyi-system/caseclosureapproval/transferTask',
    method: 'post',
    data,
  })
}
